package common;

/**
 * Created by Administrator on 2017-11-28.
 */
public enum Module_role {
    EMPLOYEE("员工模块",0),MINISTER("部长模块",1),MANAGE("经理模块",2),ADMIN("管理员模块",3);
    private  String module;
    private int role;

    public static int getRole(String module) {
        for (Module_role moduleRole : Module_role.values()) {
            if (moduleRole.getModule().equals(module)) {
                return moduleRole.getRole();
            }
        }
        return 0;
    }

    Module_role(String module, int role) {
        this.module = module;
        this.role = role;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public int getRole() {
        return role;
    }

    public void setRole(int role) {
        this.role = role;
    }
}
